import client from './client';

export interface LoginRequest {
  username: string;
  password: string;
}

export interface LoginResponse {
  token: string;
  username: string;
}

export const login = (data: LoginRequest) => 
  client.post<LoginResponse>('/auth/login', data);

export const logout = () => 
  client.post('/auth/logout');

export const refreshToken = () => 
  client.post('/auth/refresh');
